package cn.tedu.batch.transformation

import org.apache.flink.api.scala.ExecutionEnvironment

/**
 * @author Amos
 * @date 2022/5/19
 */

object BatchMinByAndMaxByDemo {
  def main(args: Array[String]): Unit = {
    val env = ExecutionEnvironment.getExecutionEnvironment

    import org.apache.flink.api.scala._
    val source: DataSet[(Int, String, Double)] = env.fromElements((1, "yuwen", 89.0), (2, "shuxue", 92.2),
      (3, "yingyu", 89.99), (4, "wuli", 98.9),
      (1, "yuwen", 88.88), (1, "wuli", 93.00),
      (1, "yuwen", 94.3))
    source.groupBy(1).maxBy(2).print()



  }

}
